Imports System.Collections.Generic
Imports System.Text

Namespace Core
    <Record(FieldMapping:=FieldMapping.ExplicitColumnsOnly, Width:=32)> _
    Friend NotInheritable Class NdxHeader
        <Column(AdvancedType:=AdvancedColumnType.Int32)> _
        Private mNativeNdxStartingPageRecordNo As Int32
        '0..3
        Public Property StartingPageRecordNo() As Int32
            Get
                Return mNativeNdxStartingPageRecordNo - 1
            End Get
            Set(value As Int32)
                mNativeNdxStartingPageRecordNo = value + 1
            End Set
        End Property


        <Column(AdvancedType:=AdvancedColumnType.Int32)> _
        Public TotalNoOfPages As Int32
        '4..7
        <Column(AdvancedType:=AdvancedColumnType.Int32)> _
        Public Zero As Int32
        '8..11
        <Column(AdvancedType:=AdvancedColumnType.UINT16)> _
        Public KeyLength As UInt16
        '12..13

        <Column(AdvancedType:=AdvancedColumnType.UINT16)> _
        Public NoOfKeysPerPage As UInt16
        ' 14..15
        <Column(AdvancedType:=AdvancedColumnType.UINT16)> _
        Public KeyType As UInt16
        ' 16..17 - 0 = char; 1 = num
        <Column(AdvancedType:=AdvancedColumnType.Int32)> _
        Public SizeOfKeyRecord As Int32
        ' 18..21
        <Column(AdvancedType:=AdvancedColumnType.[BYTE])> _
        Public Reserved As [Byte]
        ' 22
        <Column(Type:=ColumnType.DBASE3_LOGICAL)> _
        Public UniqueFlag As Boolean
        ' 23
        ' 
        <Column(Type:=ColumnType.DBASE3_CHARACTER, Width:=255)> _
        Public KeyString1 As String
        ' 24..
        ' 512 - 255 - 24
        <Column(Type:=ColumnType.DBASE3_CHARACTER, Width:=233)> _
        Public KeyString2 As String
    End Class

End Namespace
